import { request } from '../../request';

const api_name = '/admin/picture'


// 图片分页列表
export const PictureById = (categoryId:any)=> {
  return request({
    url: `${api_name}/findByParentId/${categoryId}`,
    method: 'get',
  })
}

export const findAll = () => {
return request({
  url: `${api_name}/findAll`,
  method: 'get'
})
}

export const SavePicture = (product:any) => {
return request({
  url: `${api_name}/save`,
  method: 'post',
  data: product,
})
}

export const UpdatePicture = (product:any) => {
return request({
  url: `${api_name}/update`,
  method: 'put',
  data: product,
})
}

export const RemovePicture = (id:any) => {
return request({
  url: `${api_name}/remove/${id}`,
  method: 'delete'
})
}